let init = {
  data: {
    selIndex: 1,
    from: ''
  },
  modeSelect: function (e) {
    this.setData({
      selIndex: e.detail.value
    })
  },
  nextStep: function () {
    let mode = '';
    if (this.data.selIndex == 1) {
      mode = '代理销货模式';
    } else {
      mode = '会员分销模式';
    }
    wx._showModal({
      title: '提示',
      confirmText: '确定',
      cancelText: '再想想',
      confirmColor: '#FAD232',
      content: '基本制度模式一旦选定，将不可更改，确定选定“' + mode + '”作为项目的基本制度模式吗？',
      success: function (res) {
        if (res.confirm) {
          wx._navigateTo('/packages/pack-C/pages/agent-manage/agent-rank-set/set-agent-rank?base_rule=' + this.data.selIndex + '&from=' + this.data.from);
        }
      }.bind(this)
    });
  }
};
module.exports = init
